package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * MqFuenteEner generated by hbm2java
 */
@Entity
@Table(name = "MQ_FUENTE_ENER", schema = "MAQEXENTA")
public class MqFuenteEner implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -385250324122991207L;
	private String cfuenteEnergia;
	private String dfuenteEnergia;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodificacion;
	private Set<DcMaqRegistro> dcMaqRegistros = new HashSet<DcMaqRegistro>(0);

	public MqFuenteEner() {
	}

	public MqFuenteEner(String cfuenteEnergia, String dfuenteEnergia,
			String cusuario, Date fhingreso, Date fhmodificacion) {
		this.cfuenteEnergia = cfuenteEnergia;
		this.dfuenteEnergia = dfuenteEnergia;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
	}

	public MqFuenteEner(String cfuenteEnergia, String dfuenteEnergia,
			String cusuario, Date fhingreso, Date fhmodificacion,
			Set<DcMaqRegistro> dcMaqRegistros) {
		this.cfuenteEnergia = cfuenteEnergia;
		this.dfuenteEnergia = dfuenteEnergia;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.dcMaqRegistros = dcMaqRegistros;
	}

	@Id
	@Column(name = "C_FUENTE_ENERGIA", unique = true, nullable = false, length = 2)
	public String getCfuenteEnergia() {
		return this.cfuenteEnergia;
	}

	public void setCfuenteEnergia(String cfuenteEnergia) {
		this.cfuenteEnergia = cfuenteEnergia;
	}

	@Column(name = "D_FUENTE_ENERGIA", nullable = false, length = 25)
	public String getDfuenteEnergia() {
		return this.dfuenteEnergia;
	}

	public void setDfuenteEnergia(String dfuenteEnergia) {
		this.dfuenteEnergia = dfuenteEnergia;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_MODIFICACION", nullable = false, length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "mqFuenteEner")
	public Set<DcMaqRegistro> getDcMaqRegistros() {
		return this.dcMaqRegistros;
	}

	public void setDcMaqRegistros(Set<DcMaqRegistro> dcMaqRegistros) {
		this.dcMaqRegistros = dcMaqRegistros;
	}

}
